package cre.sample.test.ds.heap;

/**
 * Created by CreGu on 2016/5/30.
 */
public class HeapApp {

    public static void main(String[] args) {
        Heap heap = new Heap(10);
//        heap.setUp(8);

//        197 194 140 138 173 61 24 34
        heap.insert(34);
        heap.insert(194);
        heap.insert(61);
        heap.insert(24);
        heap.insert(173);
        heap.insert(138);
        heap.insert(140);
        heap.insert(197);
        heap.insert(210);


        heap.display();

        System.out.println("remove max");
        heap.remove();
        heap.display();
        System.out.println("remove max");
        heap.remove();
        heap.display();
        System.out.println("remove max");
        heap.remove();
        heap.display();
        System.out.println("remove max");
        heap.remove();
        heap.display();
        System.out.println("remove max");
        heap.remove();
        heap.display();
        System.out.println("remove max");
        heap.remove();
        heap.display();
    }
}
